package pnu.ssm.model.job;

import pnu.ssm.model.command.Command;
import pnu.ssm.model.stuff.Block;
import pnu.ssm.model.stuff.Factory;

public class Job {
	private Factory factory;
	private Command command;
	private Block block;
	private JobEnum state;
	
	public Job() {
		this(null,null,null);
	}
	
	public Job(Factory f, Command c, Block b) {
		this.factory = f;
		this.command = c;
		this.block = b;
		this.setState(JobEnum.Todo);
	}
	
	public boolean isNil(){
		return factory == null || block == null || command == null;
	}

	public Factory getFactory() {
		return factory;
	}

	public void setFactory(Factory factory) {
		this.factory = factory;
	}

	public Command getCommand() {
		return command;
	}

	public void setCommand(Command command) {
		this.command = command;
	}

	public Block getBlock() {
		return block;
	}

	public void setBlock(Block block) {
		this.block = block;
	}

	public JobEnum getState() {
		return state;
	}

	public void setState(JobEnum state) {
		this.state = state;
	}
}
